//#pragma once
//#include <d3d9.h>
//#include <d3dx9core.h>
//
//typedef DWORD HTEXTURE;
//
//struct DX2DVertex
//{
//	float			x, y;		// screen position    
//	float			z;			// Z-buffer depth 0..1
//	DWORD			col;		// color
//	float			tx, ty;		// texture coordinates
//};
//
//
///*
//** HGE Quad structure
//*/
//struct DX2DQuad
//{
//	DX2DVertex				v[4];
//	LPDIRECT3DTEXTURE9		tex;
//	int						blend;
//};
//
///*
//** Primitive type constants
//*/
//#define DX2DPRIM_LINES			2
//#define DX2DPRIM_TRIPLES		3
//#define DX2DPRIM_QUADS			4
//
//#define D3DFVF_HGEVERTEX (D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1)
//#define VERTEX_BUFFER_SIZE 4000
//
//#define	BLEND_COLORADD		1
//#define	BLEND_COLORMUL		0
//#define	BLEND_ALPHABLEND	2
//#define	BLEND_ALPHAADD		0
//#define	BLEND_ZWRITE		4
//#define	BLEND_NOZWRITE		0
//
//#define BLEND_DEFAULT		(BLEND_COLORMUL | BLEND_ALPHABLEND | BLEND_NOZWRITE)
//#define BLEND_DEFAULT_Z		(BLEND_COLORMUL | BLEND_ALPHABLEND | BLEND_ZWRITE)
//
//
//class DX2DRender
//{
//public:
//	DX2DRender(void);
//	~DX2DRender(void);
//	void						Initialize(IDirect3DDevice9*p, int w, int h);
//	void						Begin2DDraw();
//	void						End2DDraw();
//
//	void						_render_batch(bool b=false);
//	void						_SetProjectionMatrix(int width, int height);
//	void						_RenderQuad(const DX2DQuad *quad);
//	void						_SetBlendMode(int blend);
//	bool						_init_lost();
//	D3DXMATRIX					matView;
//	D3DXMATRIX					matProj;
//	int							nScreenWidth;
//	int							nScreenHeight;
//	int							nPrim;
//	int							CurPrimType;
//	int							CurBlendMode;
//	LPDIRECT3DTEXTURE9			CurTexture;
//	bool						bTextureFilter;
//	IDirect3DIndexBuffer9*		pIB;
//	IDirect3DVertexBuffer9*		pVB;
//	DX2DVertex*					VertArray;
//	IDirect3DDevice9*			pD3DDevice;
//};
